/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.aaron.platform.entity;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 付款明细类
 * @author chenzhuohua
 * @version 1.0
 */
@Entity
@Table(name = "gczx_payment_detail_info")
@SequenceGenerator(name="gczx_paymentdetail_generator", sequenceName="GCZX_PAYMENTDETAIL_GENERATOR", allocationSize = 1)
public class GczxPayDetail implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator="gczx_paymentdetail_generator")
    @Column(name = "pay_detail_id")
    private Integer payDetailID;
    
    /** 付款金额  */
    @Column(name = "pay_value")
    private double payValue;
    
    /** 付款金额  */
    @Column(name = "pay_detail_help")
    private String payDetailHelp;

    @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}, fetch = FetchType.LAZY)
    @JoinColumn(name = "order_id", referencedColumnName = "order_id")
    private GczxOrderInfo orderInfo;

    @ManyToOne(cascade = { CascadeType.ALL}, fetch = FetchType.LAZY)
    @JoinColumn(name = "pay_id", referencedColumnName = "pay_id")
    private GczxPaymentInfo paymentInfo;

    public GczxOrderInfo getOrderInfo() {
        return orderInfo;
    }

    public void setOrderInfo(GczxOrderInfo orderInfo) {
        this.orderInfo = orderInfo;
    }

    public Integer getPayDetailID() {
        return payDetailID;
    }

    public void setPayDetailID(Integer payDetailID) {
        this.payDetailID = payDetailID;
    }

    public String getPayDetailHelp() {
        return payDetailHelp;
    }

    public void setPayDetailHelp(String payDetailHelp) {
        this.payDetailHelp = payDetailHelp;
    }
    
    public double getPayValue() {
        return payValue;
    }

    public void setPayValue(double payValue) {
        this.payValue = payValue;
    }

    public GczxPaymentInfo getPaymentInfo() {
        return paymentInfo;
    }

    public void setPaymentInfo(GczxPaymentInfo paymentInfo) {
        this.paymentInfo = paymentInfo;
    }
}
